layui.use(['form', 'layer'], function () {
    var form = layui.form
        ,$ = layui.jquery;

    _post("/framework/sysCodesetDetail.do?method=listByCodesetEnname", {enName: "ajAdType"})
        .then(response => {
            _initSingleSelectItem({
                form: form,
                selector: "#type"
                ,dataList: response.data
                ,key: "k"
                ,value: "v"
            });
        });

    _post("/framework/sysCodesetDetail.do?method=listByCodesetEnname", {enName: "ajAdShowType"})
        .then(response => {
            _initSingleSelectItem({
                form: form,
                selector: "#showType"
                ,dataList: response.data
                ,key: "k"
                ,value: "v"
            });
        });

    verifyExt(form);
    form.on('submit(*)', function(data){ //form校验成功才会执行下面的代码
        //怎么刷新树状table
        ajax("/aj/AjAd.do?method=add", serializeObject($("#bofrom")));
        return false; //禁用form表单自带的提交
    });

});